<?php echo $this->load->view('header.php'); ?>
<?php
$items = array(anchor('category/create','+ New category',array('class'=>'active')));
$data["items"] = $items;
echo $this->load->view('body_open.php',$data); ?>

<h3>Category list</h3>
<table>
<?php foreach ($all as $row): ?>
    <tr>
    <td><?php echo $row->name; ?></td>
    <td class="action">
    <a href="<?php echo site_url('photo/main/'.$row->category_id); ?>" title="View photos" class="view">View</a>
    <a href="#" class="edit">Edit</a>
    <a href="#" class="delete">Delete</a></td>
    </tr>
<?php endforeach; ?>
</table>

<?php echo $this->load->view('body_close.php'); ?>